#!/bin/sh

CHECK_CLASSPATH=`echo ../lib/*.jar | sed "s/ /:/g"`

_classpath="$CHECK_CLASSPATH:.:../bin:../config"
_cp=`echo ${_classpath}`
echo ${_cp}

#echo jvm options 
JVM_SIZE="-server -Xms1G -Xmx1G -XX:NewSize=256m -XX:MaxNewSize=256m"
JVM_GC_TYPE="-XX:+HeapDumpOnOutOfMemoryError -XX:+UseParNewGC -XX:+UseConcMarkSweepGC"
JVM_GC_OPT="-XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75 -XX:+
UseCMSInitiatingOccupancyOnly"
JVM_GC_LOG="-XX:+PrintTenuringDistribution -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintG
CApplicationConcurrentTime -Xloggc:./gc.log"
JVM_OPTS="$JVM_SIZE $JVM_GC_TYPE $JVM_GC_OPT $JVM_GC_LOG"

$JAVA_HOME/bin/java -classpath ${_cp} com.tenpay.batchproc.main.Server $1&